


// Left
let Either = function (x) {
    this._value = x;
};

Either.of = function (x) {
    return new Either(x);
};


// prototype
Either.prototype.map = function () {
    return this;
};

// Right
let Right = function(x){
    this._value = x;
};

Right.of = function(x){
    return new Right(x);
};

// prototype
Right.prototype.map = function(f){
    return Right.of(f(this._value))
};


module.exports  = {
    Left,Right
};
